<template>
  <a-tag :closable="closable" :color="color" :visible="visible" @close="close">
    <slot />
  </a-tag>
</template>

<script>
export default {
  name: 'DTag',
  props: {
    closable: {
      type: Boolean,
      default: false
    },
    color: {
      type: String
    },
    visible: {
      type: Boolean,
      default: true
    }
  },
  methods: {
    close() {
      this.$emit('update:visible', false);
      this.$emit('close');
    }
  }
};
</script>

<style lang="scss" scoped></style>
